import App from './App'
import zhHans from './local/uni-app.zh-Hans.json'
import zhHant from './local/uni-app.zh-Hant.json'
const messages = {
  'zh-Hans': zhHans,
  'zh-Hant': zhHant
};
let i18nConfig = {
  locale: uni.getLocale(),
  messages
}
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
import uView from 'uview-ui'
Vue.use(uView)
import config from "./http/config.js"
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
Vue.prototype.$config = config;
// 挂载api
import api from "./apis"
Vue.prototype.$api = api;
const app = new Vue({
  i18n,
  ...App
})
// 引入请求封装，将app参数传递到配置中
// require('@/common/http.interceptor.js')(app)
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif